package unit3.part8;

import java.util.Scanner;

/**
 * 跳数计算
 */
public class JumpNum {
    public static void main(String args[]) {
        System.out.println("请输入跳数计算的边界值：");
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();

        int sum = 0;
        for (int i = 1; i <= num; i++) {
            if (i % 10 == 3) {
                continue;
            }
            sum += i;// 累加
        }
        System.out.print("1~" + num + ",跳过个位数字是3的数字之和：" + sum);
    }
}